<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/3
 * Time: 15:08
 */

namespace App\Model;


use Illuminate\Database\Eloquent\Model;
class RecordWithdraw extends Model
{
    /**
     * 交易记录表
     * @var string
     */
    protected $table = 'record_withdraw';
    protected $fillable = [
        'id' ,
        'uid',
        'tid',
        'bank_id',
        'money',
        'status',
        'procedure',
        'operator',
        'withdraw_time',
        'audit_time',
        'remarks',
        'ip',
        'beneficiary_name',
        'account_name',
        'collection_number',
        'withdrawal_type',
    ];
    /**
     * 添加提现记录
     * @param array $order
     * @return bool|int
     */
    public function add_withdraw($order = array())
    {
        if(empty($order)){
            return false;
        }
        $rico = $this->insertGetId($order);
        if ($rico) {
            return $rico;
        } else {
            return false;
        }
    }

}